/* $Id:item_spell.h $ */
/*
   Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
   Part of the Moros Project http://moros.sourceforge.net/

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 3.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY.

   See the COPYING file for more details.
*/

#ifndef __ITEM_SPELL_H
#define __ITEM_SPELL_H

#include <string>
#include <map>
#include <list>
using namespace std;



class item_spell {
    class action *spell;
    int level;
    int type;
public:
    item_spell();

    // Field : spell
    class action& getSpell() const;
    void setSpell(class action &v);

    // Field : level
    const int getLevel() const;
    void setLevel(const int v);

    // Field : type
    enum type_enum{type_continues,type_on_hit,type_single_use};
    const int getType() const;
    const string showType() const;
    void setType(const int v);
    void setType(const string v);

    void save(class channel &ch);
    void load(class channel &ch);
    void xml(ofstream &f, int l=0, int r=0);
};

#endif // __ITEM_SPELL_H
